package com.jshcbd.modules.asset.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jshcbd.framework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author zhoucd
 * @date
 * @description
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel( description = "公司信息")
@TableName("company")
public class CompanyEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    private String pid;

    private String id;

    @ApiModelProperty(value = "公司名称",required = true)
    @NotNull
    @Excel(name = "公司名称")
    private String name;


    @ApiModelProperty(value = "组织机构代码",required = true)
    @NotNull
    @Excel(name = "组织机构代码")
    private String code;

    @ApiModelProperty(value = "联系人",required = true)
    @NotNull
    @Excel(name = "联系人")
    private String contact;

    @ApiModelProperty(value = "联系电话",required = true)
    @NotNull
    @Excel(name = "联系电话")
    private String phone;

    @ApiModelProperty(value = "领用额度(两位小数)",required = true)
    @NotNull
    @Excel(name = "领用额度",numFormat = "0.00")
    private BigDecimal receiveLimit;

    @ApiModelProperty(value = "地址",required = true)
    @NotNull
    @Excel(name = "地址")
    private String address;

    @ApiModelProperty(value = "备注")
    @Excel(name = "备注")
    private String  note;


    @TableLogic
    private Integer delFlag;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
